<?php
/**
 * Simple Light PHP Framework
 *
 * @copyright Marc PEPIN 2012
 * @author Marc PEPIN
 *
 */

defined('SLP_ROOT') or die("You've not access to this page");
 
/**
 * Simple Light Php Framework Application Controller Class
 *
 * It's the class that every library in
 * Simple Light Php will be assigned to.
 *
 * @package             Slp
 * @author              Marc PEPIN
 */

class Slp_Controller {
	
	/**
	* @var $instance instance of Slp controller
	*/
	
	static private $instance;
	
	
	/**
	* Constructor
	*/
	
	public function __construct() {
	
		self::$instance =& $this;
		
		$this->load =& 	Slp::getInstance()->loaded;
		$this->config =& $this->load->Slp_Config;
		$this->db =& $this->load->Slp_Database;
		$this->logger =& $this->load->Slp_Logger;
		$this->common =& $this->load->Slp_Common;
		$this->session =& $this->load->Slp_Session;
	}
	
	/**
	* Get Controller instance
	* @return Slp_Controller
	*/
	
	static public function getInstance() {
		return self::$instance;
	}

}

?>